package cn.cvs.controller;

import cn.cvs.service.ElectronicManagerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;

@Controller
@RequestMapping(value = "/hi")
public class ElectronicManagerServlet {

    @Autowired
    private ElectronicManagerService electronicManagerService;

    @RequestMapping(value = "/hi01")
    public String searchElectronic(Model model){
        model.addAttribute("electronics",electronicManagerService.searchElectronic());
        return "electronic_manager";
    }
}
